source "$METIS_HOME"metis-plugin.config

_pluginName=`basename $0 | sed -r 's/.sh$//'`
_pluginOutputDirectory="${pluginDir}${_pluginName}/"
mkdir ${_pluginOutputDirectory}

# Can only have one thread at a time
if [ -n "$1" ]; then
	timeout="$1"
else	
	timeout=2700
fi
threads=1

query='select ipaddress from services where port = "500" and state = "open"'
cmd="${m_ike_scan_sh} \${1} &> ${_pluginOutputDirectory}\${1}.ikescan"

"$pythonInterpreter" "$q2ex" -d "$database" -q "$query" -c "$cmd" -t "$threads" -T "$timeout" -o "$_pluginOutputDirectory" -e "$_pluginName" -L "$logginglevel" -O "$outputLog"

